package cn.roadm.app.bill.util;

import cn.roadm.app.bill.modal.OperationLogModal;

import java.util.concurrent.ConcurrentLinkedQueue;

public enum OperationLogQueue {

    INSTANCE;

    private final ConcurrentLinkedQueue<OperationLogModal> queue = new ConcurrentLinkedQueue<>();

    public boolean add(OperationLogModal operationLogModal) {
        return queue.offer(operationLogModal);
    }

    public OperationLogModal poll() {
        // 阻塞获取
        return queue.poll();
    }
}
